There is known an image generating system for generating an image viewed from a given viewpoint in an object space which is a virtual three-dimensional space. Such an image generating system is very popular since a so-called virtual reality is provided. Where the image generating system is applied to a racing game, a player can enjoy the three-dimensional game by controlling a racing car (or object) for causing his or her racing car to run in the object space and also to compete against racing cars controlled by other players or computer.
Such an image generating system raises an important technical problem in that more realistic images must be generated to improve the virtual reality for the players. One of the techniques to overcome such a problem is known as an environment mapping technique.
The environment mapping maps an environment texture representing the surrounding environment of an object thereon to represent a reflection of the environment onto the object so that the reality of the object image will be improved.
The following example of the environment mapping techniques (which will be called “comparative environment mapping”) may be considered.
In the comparative environment mapping, an environment texture viewable from the object toward a virtual camera is previously provided. This environment texture is then mapped from the virtual camera (or in a direction from the virtual camera toward the object). Thus, the environment can be reflected onto the object even when the virtual camera is moved and a gazing point of the virtual camera moves behind the object.
However, this comparative environment mapping has a problem in that a light source cannot accurately be reflected onto the object.
More particularly, it is now assumed that the positional relationship among an object (car) 10, a virtual camera 12 and a shading light source 14 is as shown in FIG. 1. In this case, the shading ought to create the reflection of light source at a location A1 in FIG. 1. Moreover, a shadow 16 of the object 10 should fall at another location A2 in FIG. 1.
However, the comparative environment mapping always maps the environment mapping starting from the virtual camera. If the comparative environment mapping is to represent the reflection of light source, therefore, the light source will always be reflected onto a gazing location of the virtual camera 12 on the object 10. In other words, the light source will be reflected onto a location A3 rather than the location A1 in FIG. 1. The resulting image will contain nonconformity. To overcome such a problem, the comparative environment mapping must map only an environment without the light source onto the object, rather than mapping the light source.